import React from "react";
import {WeaLocaleProvider} from "ecCom";
import classNames from 'classnames';

const getLabel = WeaLocaleProvider.getLabel;

export default class FooterView extends React.Component {
    render() {
        const { shortkey, data, ...props} = this.props;
        if(!data) return null;

        const clsNameStr = classNames('wev-edc-form-bottom__view', {
          'footer-default-text': !data.desc
        });

        return (
              <div className='footer-content'>
                <div
                  {...props}
                  className={clsNameStr}
                >
                  {data.desc ?
                    <p className='fbottom-desc'>
                      <span className='content' dangerouslySetInnerHTML={{__html: data.desc}} />
                    </p>
                    :
                    <p className='text_center'>{getLabel('511624', '点击此处设置页脚')}</p>
                  }
                </div>
              </div>
        )
    }
}
